How to find common factors of two numbers